Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@ampproject/toolbox-runtime-version
Advanced tools
Use it to query cdn.ampproject.org
for the current release or canary version of the AMP Runtime. Uses a stale-while-revalidate caching strategy to avoid network requests in the critical path.
You can use the API to re-write AMP runtime URLs to their versioned counter parts to improve browser caching, e.g. to replace:
https://cdn.ampproject.org/v0.css
with:
https://cdn.ampproject.org/rtv/001515617716922/v0.css
Install via:
npm install @ampproject/toolbox-runtime-version
Basic usage:
const runtimeVersion = require('@ampproject/toolbox-runtime-version');
// Release version
runtimeVersion.currentVersion().then(version => {
console.log(version);
});
// Canary version
runtimeVersion.currentVersion({canary: true}).then(version => {
console.log(version);
});
// Rewriting cache URLs
const ampRuntimeUrl = 'https://cdn.ampproject.org/v0.js';
const version = await runtimeVersion.currentVersion();
const versionedAmpRuntimeUrl = ampRuntimeUrl.replace(
'https://cdn.ampproject.org/',
'https://cdn.ampproject.org/rtv/' + version + '/'
);
console.log(versionedAmpRuntimeUrl);
FAQs
AMP Runtime versions
The npm package @ampproject/toolbox-runtime-version receives a total of 40,538 weekly downloads. As such, @ampproject/toolbox-runtime-version popularity was classified as popular.
We found that @ampproject/toolbox-runtime-version demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.